﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="uMESPartReportingForm.aspx.cs" Inherits="Kanban_uMESPartReportingForm" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="../Scripts/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="../Scripts/json2.js"></script>
    <title>零件加工进度看板</title>
    <style>
        html, body {
            margin: 0px;
            padding: 0px;
            color: #ffffff;
            font: normal 18px Microsoft YaHei;
        }

        #divLook {
            height: 100vh;
            overflow-x: auto;
        }

        .tabLook, .tabspec {
            margin: 0px;
            padding: 0px;
            border-collapse: collapse;
            border-spacing: 0;
            border: none;
        }

            .tabLook tr th {
                border-collapse: collapse;
                border: 1px solid #41497c;
                padding: 5px 0px;
                color: #ffffff;
            }

            .tabLook, .tabLook tr td {
                border-collapse: collapse;
                border: 1px solid #41497c;
                margin: 0px;
                padding: 0px;
            }

            .tabspec tr td {
                width: 160px;
                height: 100%;
                border: 1px solid #41497c;
            }

            .tabspec tr:first-of-type td {
                border-top: none;
            }

            .tabspec tr td:last-child {
                border-right: none;
            }

            .tabspec tr:last-of-type td {
                border-bottom: none;
            }

            .tabspec tr td:first-child {
                border-left: none;
            }
    </style>
</head>
<body style="background-color: #09173a;">
    <form id="form1" runat="server">
        <div id="divLook">
            <div id="divtit" style="height: 78px; display: table; vertical-align: middle;">
                <div id="divScreen" style="width: 20%; height: 78px; line-height: 78px; overflow: hidden; float: left; display: table-cell; vertical-align: middle;">
                    <span style="margin-left: 10px;">工作令号</span>
                    <select id="oprno" style="width: 150px; height: 30px; padding-left: 5px;" onchange="JavaScript:getSpecLook();">
                        <option value="全部">全部</option>
                    </select>
                    <input id="checkIsCurrentFactory" type="checkbox" onchange="JavaScript:refreshPage()" />
                </div>
                <div style="width: 60%; height: 78px; line-height: 78px; overflow: hidden; float: left; text-align: center; font-size: 35px; display: table-cell; vertical-align: middle;">零件加工进度看板</div>
                <div id="currentTime" style="width: 20%; height: 78px; line-height: 78px; overflow: hidden; float: left; display: table-cell; vertical-align: middle;"></div>
            </div>
            <div id="ruler" style="height: 20px; margin-bottom: 10px;">
                <div style="width: 75px; height: 100%; line-height: 2vh; overflow: hidden; float: left; text-align: center; font-size: 15px;">图例:</div>
                <div style="width: 100px; height: 100%; line-height: 2vh; overflow: hidden; float: left; text-align: left; font-size: 15px;"><span style="color: #ff0000;">▲</span>质量报警</div>
                <div style="width: 100px; height: 100%; line-height: 2vh; overflow: hidden; float: left; text-align: left; font-size: 15px;">
                    <div style="width: 20px; height: 15px; background-color: #ffc0cb; float: left; text-align: left; font-size: 15px;"></div>
                    <div style="float: left;">当前工序</div>
                </div>
                <div style="width: 100px; height: 100%; line-height: 2vh; overflow: hidden; float: left; text-align: left; font-size: 15px;">
                    <div style="width: 20px; height: 15px; background-color: Yellow; float: left;"></div>
                    <div style="float: left;">已派工</div>
                </div>
                <div style="width: 100px; height: 100%; line-height: 2vh; overflow: hidden; float: left; text-align: left; font-size: 15px;">
                    <div style="width: 20px; height: 15px; background-color: #FFD306; float: left;"></div>
                    <div style="float: left;">已接收</div>
                </div>
                <div style="width: 100px; height: 100%; line-height: 2vh; overflow: hidden; float: left; text-align: left; font-size: 15px;">
                    <div style="width: 20px; height: 15px; background-color: YellowGreen; float: left;"></div>
                    <div style="float: left;">已报工</div>
                </div>
                <div style="width: 100px; height: 100%; line-height: 2vh; overflow: hidden; float: left; text-align: left; font-size: 15px;">
                    <div style="width: 20px; height: 15px; background-color: #00CCFF; float: left;"></div>
                    <div style="float: left;">已检验</div>
                </div>
                <div style="width: 100px; height: 100%; line-height: 2vh; overflow: hidden; float: left; text-align: left; font-size: 15px;">
                    <div style="width: 20px; height: 15px; background-color: Green; float: left;"></div>
                    <div style="float: left;">已完工</div>
                </div>
            </div>
            <div style="height: 84.6vh; margin-bottom: 1.5vh;">
                <input type="hidden" id="hidPageCount" value="0" />
                <input type="hidden" id="hidCurrentPage" value="0" />
                <table class="tabLook">
                </table>
            </div>
        </div>
    </form>
</body>
</html>
<script src="../Scripts/Kanban/KanbanJs.js" type="text/javascript"></script>
<script src="../Scripts/Kanban/PartReporting.js" type="text/javascript"></script>    
<script type="text/javascript">
    var t = <%=ConfigurationManager.AppSettings["clockTiming"]%>;
    $(function () {
        $.ajax({
            type: "POST",
            contentType: "application/x-www-form-urlencoded",
            url: "uMESPartReportingHandler.ashx",
            data: {
                "Type": "GetOprNo"
            },
            success: function (result) {
                var data = JSON.parse(result);
                var oprno = $('#oprno');
                for (var i = 0; i < data.data.length; i++) {
                    oprno.append("<option value='" + data.data[i] + "'>" + data.data[i] + "</option>");
                }
                oprno.find("option[text='全部']").attr("selected", true);
            },
            error: function (e) {
                console.log(e.status);
                console.log(e.responseText);
            }
        });
        getSpecLook();
        setInterval(function () {
            getSpecLook();
        }, t);
    });
    setInterval(showTime, 1000);
    function refreshPage(){
        t = <%=ConfigurationManager.AppSettings["clockTiming"]%>;
        $('#hidCurrentPage').val(Number($('#hidCurrentPage').val())-1);
        getSpecLook();
    };
</script>
